<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"></script>
    <div id="app">
        {{msg}}{{uname}}
        <input type="text" v-show="flag" v-model="val">
        <input type="text" v-if="flag" v-model="val">
        <h1 v-html="msg1"></h1>
        <p v-if="score>=80">优秀</p>
        <p v-else-if="score>=60">合格</p>
        <p v-else>差</p>
        <button @click="fn(2)">{{score}}</button>
        <button @click="change()">按钮</button>
        <img :src="arr[0]" alt="">
    </div>
    <script>
        const app = new Vue({
            el: "#app",
            data: {
                msg: "hello msg",
                uname: '李雪虎',
                val: "lixuehu",
                msg1: '<div> hhh</div>',
                flag: true,
                score: 80,
                arr:['../code练习/imgs/10-01.png']
            },
            methods: {
                fn(n) {
                    this.score += n
                },
                change() {
                    this.flag=!this.flag
                }
            }
        })
    </script>
</body>

</html>